<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/api.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<title>CConsoleApplication</title>
</head>

<body>
<div id="apiPage">

<div id="apiHeader">
<a href="http://www.yiiframework.com">Yii Framework</a> v1.1.17 Class Reference
</div><!-- end of header -->

<div id="content">
<h1>CConsoleApplication</h1>
<div id="nav">
<a href="index.html">All Packages</a>
| <a href="#properties">Properties</a>
| <a href="#methods">Methods</a>
| <a href="#events">Events</a>
</div>

<table class="summaryTable docClass">
<colgroup>
	<col class="col-name" />
	<col class="col-value" />
</colgroup>
<tr>
  <th>Package</th>
  <td><a href="index.html#system.console">system.console</a></td>
</tr>
<tr>
  <th>Inheritance</th>
  <td>class CConsoleApplication &raquo;
<a href="CApplication.html">CApplication</a> &raquo;
<a href="CModule.html">CModule</a> &raquo;
<a href="CComponent.html">CComponent</a></td>
</tr>
<tr>
  <th>Since</th>
  <td>1.0</td>
</tr>
<tr>
  <th>Source Code</th>
  <td><a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php">framework/console/CConsoleApplication.php</a></td>
</tr>
</table>

<div id="classDescription">
CConsoleApplication represents a console application.
<br/><br/>
CConsoleApplication extends <a href="CApplication.html">CApplication</a> by providing functionalities
specific to console requests. In particular, it deals with console requests
through a command-based approach:
<ul>
<li>A console application consists of one or several possible user commands;</li>
<li>Each user command is implemented as a class extending <a href="CConsoleCommand.html">CConsoleCommand</a>;</li>
<li>User specifies which command to run on the command line;</li>
<li>The command processes the user request with the specified parameters.</li>
</ul>
<br/><br/>
The command classes reside in the directory <a href="CConsoleApplication.html#getCommandPath">commandPath</a>.
The name of the class follows the pattern: &lt;command-name&gt;Command, and its
file name is the same as the class name. For example, the 'ShellCommand' class defines
a 'shell' command and the class file name is 'ShellCommand.php'.
<br/><br/>
To run the console application, enter the following on the command line:
<pre>
php path/to/entry_script.php &lt;command name&gt; [param 1] [param 2] ...
</pre>
<br/><br/>
You may use the following to see help instructions about a command:
<pre>
php path/to/entry_script.php help &lt;command name&gt;
</pre></div>
<a name="properties"></a>

<div class="summary docProperty">
<h2>Public Properties</h2>

<p><a href="#" class="toggle">Hide inherited properties</a></p>

<table class="summaryTable">
<colgroup>
	<col class="col-property" />
	<col class="col-type" />
	<col class="col-description" />
	<col class="col-defined" />
</colgroup>
<tr>
  <th>Property</th><th>Type</th><th>Description</th><th>Defined By</th>
</tr>
<tr class="inherited" id="basePath">
  <td><a href="CApplication.html#basePath-detail">basePath</a></td>
  <td>string</td>
  <td>Returns the root path of the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="baseUrl">
  <td><a href="CApplication.html#baseUrl-detail">baseUrl</a></td>
  <td>string</td>
  <td>Returns the relative URL for the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="behaviors">
  <td><a href="CModule.html#behaviors-detail">behaviors</a></td>
  <td>array</td>
  <td>the behaviors that should be attached to the module.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="cache">
  <td><a href="CApplication.html#cache-detail">cache</a></td>
  <td><a href="CCache.html">CCache</a></td>
  <td>Returns the cache component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="charset">
  <td><a href="CApplication.html#charset-detail">charset</a></td>
  <td>string</td>
  <td>the charset currently used for the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr id="command">
  <td><a href="CConsoleApplication.html#command-detail">command</a></td>
  <td>CConsoleCommand|null</td>
  <td>Returns the currently running command.</td>
  <td>CConsoleApplication</td>
</tr>
<tr id="commandMap">
  <td><a href="CConsoleApplication.html#commandMap-detail">commandMap</a></td>
  <td>array</td>
  <td>mapping from command name to command configurations.</td>
  <td>CConsoleApplication</td>
</tr>
<tr id="commandPath">
  <td><a href="CConsoleApplication.html#commandPath-detail">commandPath</a></td>
  <td>string</td>
  <td>the directory that contains the command classes.</td>
  <td>CConsoleApplication</td>
</tr>
<tr id="commandRunner">
  <td><a href="CConsoleApplication.html#commandRunner-detail">commandRunner</a></td>
  <td><a href="CConsoleCommandRunner.html">CConsoleCommandRunner</a></td>
  <td>Returns the command runner.</td>
  <td>CConsoleApplication</td>
</tr>
<tr class="inherited" id="components">
  <td><a href="CModule.html#components-detail">components</a></td>
  <td>array</td>
  <td>Returns the application components.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="controller">
  <td><a href="CApplication.html#controller-detail">controller</a></td>
  <td><a href="CController.html">CController</a></td>
  <td>the currently active controller.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="coreMessages">
  <td><a href="CApplication.html#coreMessages-detail">coreMessages</a></td>
  <td><a href="CPhpMessageSource.html">CPhpMessageSource</a></td>
  <td>Returns the core message translations component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="dateFormatter">
  <td><a href="CApplication.html#dateFormatter-detail">dateFormatter</a></td>
  <td><a href="CDateFormatter.html">CDateFormatter</a></td>
  <td>Returns the locale-dependent date formatter.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="db">
  <td><a href="CApplication.html#db-detail">db</a></td>
  <td><a href="CDbConnection.html">CDbConnection</a></td>
  <td>Returns the database connection component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="errorHandler">
  <td><a href="CApplication.html#errorHandler-detail">errorHandler</a></td>
  <td><a href="CErrorHandler.html">CErrorHandler</a></td>
  <td>Returns the error handler component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="extensionPath">
  <td><a href="CApplication.html#extensionPath-detail">extensionPath</a></td>
  <td>string</td>
  <td>Returns the root directory that holds all third-party extensions.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="format">
  <td><a href="CApplication.html#format-detail">format</a></td>
  <td><a href="CFormatter.html">CFormatter</a></td>
  <td>Returns the formatter component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="homeUrl">
  <td><a href="CApplication.html#homeUrl-detail">homeUrl</a></td>
  <td>string</td>
  <td>the homepage URL</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="id">
  <td><a href="CApplication.html#id-detail">id</a></td>
  <td>string</td>
  <td>Returns the unique identifier for the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="language">
  <td><a href="CApplication.html#language-detail">language</a></td>
  <td>string</td>
  <td>Returns the language that the user is using and the application should be targeted to.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="locale">
  <td><a href="CApplication.html#locale-detail">locale</a></td>
  <td>an</td>
  <td>Returns the locale instance.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="localeClass">
  <td><a href="CApplication.html#localeClass-detail">localeClass</a></td>
  <td>string</td>
  <td>the class used to get locale data.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="localeDataPath">
  <td><a href="CApplication.html#localeDataPath-detail">localeDataPath</a></td>
  <td>string</td>
  <td>Returns the directory that contains the locale data.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="messages">
  <td><a href="CApplication.html#messages-detail">messages</a></td>
  <td><a href="CMessageSource.html">CMessageSource</a></td>
  <td>Returns the application message translations component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="modulePath">
  <td><a href="CModule.html#modulePath-detail">modulePath</a></td>
  <td>string</td>
  <td>Returns the directory that contains the application modules.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="modules">
  <td><a href="CModule.html#modules-detail">modules</a></td>
  <td>array</td>
  <td>Returns the configuration of the currently installed modules.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="name">
  <td><a href="CApplication.html#name-detail">name</a></td>
  <td>string</td>
  <td>the application name.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="numberFormatter">
  <td><a href="CApplication.html#numberFormatter-detail">numberFormatter</a></td>
  <td><a href="CNumberFormatter.html">CNumberFormatter</a></td>
  <td>the locale-dependent number formatter.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="params">
  <td><a href="CModule.html#params-detail">params</a></td>
  <td><a href="CAttributeCollection.html">CAttributeCollection</a></td>
  <td>Returns user-defined parameters.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="parentModule">
  <td><a href="CModule.html#parentModule-detail">parentModule</a></td>
  <td><a href="CModule.html">CModule</a></td>
  <td>Returns the parent module.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="preload">
  <td><a href="CModule.html#preload-detail">preload</a></td>
  <td>array</td>
  <td>the IDs of the application components that should be preloaded.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="request">
  <td><a href="CApplication.html#request-detail">request</a></td>
  <td><a href="CHttpRequest.html">CHttpRequest</a></td>
  <td>Returns the request component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="runtimePath">
  <td><a href="CApplication.html#runtimePath-detail">runtimePath</a></td>
  <td>string</td>
  <td>Returns the directory that stores runtime files.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="securityManager">
  <td><a href="CApplication.html#securityManager-detail">securityManager</a></td>
  <td><a href="CSecurityManager.html">CSecurityManager</a></td>
  <td>Returns the security manager component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="sourceLanguage">
  <td><a href="CApplication.html#sourceLanguage-detail">sourceLanguage</a></td>
  <td>string</td>
  <td>the language that the application is written in.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="statePersister">
  <td><a href="CApplication.html#statePersister-detail">statePersister</a></td>
  <td><a href="CStatePersister.html">CStatePersister</a></td>
  <td>Returns the state persister component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="timeZone">
  <td><a href="CApplication.html#timeZone-detail">timeZone</a></td>
  <td>string</td>
  <td>Returns the time zone used by this application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="urlManager">
  <td><a href="CApplication.html#urlManager-detail">urlManager</a></td>
  <td><a href="CUrlManager.html">CUrlManager</a></td>
  <td>Returns the URL manager component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
</table>
</div>
<a name="methods"></a>

<div class="summary docMethod">
<h2>Public Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summaryTable">
<colgroup>
	<col class="col-method" />
	<col class="col-description" />
	<col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
<tr class="inherited" id="__call">
  <td><a href="CComponent.html#__call-detail">__call()</a></td>
  <td>Calls the named method which is not a class method.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="__construct">
  <td><a href="CApplication.html#__construct-detail">__construct()</a></td>
  <td>Constructor.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="__get">
  <td><a href="CModule.html#__get-detail">__get()</a></td>
  <td>Getter magic method.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="__isset">
  <td><a href="CModule.html#__isset-detail">__isset()</a></td>
  <td>Checks if a property value is null.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="__set">
  <td><a href="CComponent.html#__set-detail">__set()</a></td>
  <td>Sets value of a component property.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="__unset">
  <td><a href="CComponent.html#__unset-detail">__unset()</a></td>
  <td>Sets a component property to be null.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="asa">
  <td><a href="CComponent.html#asa-detail">asa()</a></td>
  <td>Returns the named behavior object.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="attachBehavior">
  <td><a href="CComponent.html#attachBehavior-detail">attachBehavior()</a></td>
  <td>Attaches a behavior to this component.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="attachBehaviors">
  <td><a href="CComponent.html#attachBehaviors-detail">attachBehaviors()</a></td>
  <td>Attaches a list of behaviors to the component.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="attachEventHandler">
  <td><a href="CComponent.html#attachEventHandler-detail">attachEventHandler()</a></td>
  <td>Attaches an event handler to an event.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="canGetProperty">
  <td><a href="CComponent.html#canGetProperty-detail">canGetProperty()</a></td>
  <td>Determines whether a property can be read.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="canSetProperty">
  <td><a href="CComponent.html#canSetProperty-detail">canSetProperty()</a></td>
  <td>Determines whether a property can be set.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="clearGlobalState">
  <td><a href="CApplication.html#clearGlobalState-detail">clearGlobalState()</a></td>
  <td>Clears a global value.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="configure">
  <td><a href="CModule.html#configure-detail">configure()</a></td>
  <td>Configures the module with the specified configuration.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="createAbsoluteUrl">
  <td><a href="CApplication.html#createAbsoluteUrl-detail">createAbsoluteUrl()</a></td>
  <td>Creates an absolute URL based on the given controller and action information.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="createUrl">
  <td><a href="CApplication.html#createUrl-detail">createUrl()</a></td>
  <td>Creates a relative URL based on the given controller and action information.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="detachBehavior">
  <td><a href="CComponent.html#detachBehavior-detail">detachBehavior()</a></td>
  <td>Detaches a behavior from the component.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="detachBehaviors">
  <td><a href="CComponent.html#detachBehaviors-detail">detachBehaviors()</a></td>
  <td>Detaches all behaviors from the component.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="detachEventHandler">
  <td><a href="CComponent.html#detachEventHandler-detail">detachEventHandler()</a></td>
  <td>Detaches an existing event handler.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="disableBehavior">
  <td><a href="CComponent.html#disableBehavior-detail">disableBehavior()</a></td>
  <td>Disables an attached behavior.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="disableBehaviors">
  <td><a href="CComponent.html#disableBehaviors-detail">disableBehaviors()</a></td>
  <td>Disables all behaviors attached to this component.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr id="displayError">
  <td><a href="CConsoleApplication.html#displayError-detail">displayError()</a></td>
  <td>Displays the captured PHP error.</td>
  <td>CConsoleApplication</td>
</tr>
<tr id="displayException">
  <td><a href="CConsoleApplication.html#displayException-detail">displayException()</a></td>
  <td>Displays the uncaught PHP exception.</td>
  <td>CConsoleApplication</td>
</tr>
<tr class="inherited" id="enableBehavior">
  <td><a href="CComponent.html#enableBehavior-detail">enableBehavior()</a></td>
  <td>Enables an attached behavior.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="enableBehaviors">
  <td><a href="CComponent.html#enableBehaviors-detail">enableBehaviors()</a></td>
  <td>Enables all behaviors attached to this component.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="end">
  <td><a href="CApplication.html#end-detail">end()</a></td>
  <td>Terminates the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="evaluateExpression">
  <td><a href="CComponent.html#evaluateExpression-detail">evaluateExpression()</a></td>
  <td>Evaluates a PHP expression or callback under the context of this component.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="findLocalizedFile">
  <td><a href="CApplication.html#findLocalizedFile-detail">findLocalizedFile()</a></td>
  <td>Returns the localized version of a specified file.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getBasePath">
  <td><a href="CApplication.html#getBasePath-detail">getBasePath()</a></td>
  <td>Returns the root path of the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getBaseUrl">
  <td><a href="CApplication.html#getBaseUrl-detail">getBaseUrl()</a></td>
  <td>Returns the relative URL for the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getCache">
  <td><a href="CApplication.html#getCache-detail">getCache()</a></td>
  <td>Returns the cache component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr id="getCommand">
  <td><a href="CConsoleApplication.html#getCommand-detail">getCommand()</a></td>
  <td>Returns the currently running command.</td>
  <td>CConsoleApplication</td>
</tr>
<tr id="getCommandPath">
  <td><a href="CConsoleApplication.html#getCommandPath-detail">getCommandPath()</a></td>
  <td>Returns the directory that contains the command classes. Defaults to 'protected/commands'.</td>
  <td>CConsoleApplication</td>
</tr>
<tr id="getCommandRunner">
  <td><a href="CConsoleApplication.html#getCommandRunner-detail">getCommandRunner()</a></td>
  <td>Returns the command runner.</td>
  <td>CConsoleApplication</td>
</tr>
<tr class="inherited" id="getComponent">
  <td><a href="CModule.html#getComponent-detail">getComponent()</a></td>
  <td>Retrieves the named application component.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="getComponents">
  <td><a href="CModule.html#getComponents-detail">getComponents()</a></td>
  <td>Returns the application components.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="getController">
  <td><a href="CApplication.html#getController-detail">getController()</a></td>
  <td>Returns the currently active controller. Null is returned in this base class.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getCoreMessages">
  <td><a href="CApplication.html#getCoreMessages-detail">getCoreMessages()</a></td>
  <td>Returns the core message translations component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getDateFormatter">
  <td><a href="CApplication.html#getDateFormatter-detail">getDateFormatter()</a></td>
  <td>Returns the locale-dependent date formatter.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getDb">
  <td><a href="CApplication.html#getDb-detail">getDb()</a></td>
  <td>Returns the database connection component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getErrorHandler">
  <td><a href="CApplication.html#getErrorHandler-detail">getErrorHandler()</a></td>
  <td>Returns the error handler component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getEventHandlers">
  <td><a href="CComponent.html#getEventHandlers-detail">getEventHandlers()</a></td>
  <td>Returns the list of attached event handlers for an event.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="getExtensionPath">
  <td><a href="CApplication.html#getExtensionPath-detail">getExtensionPath()</a></td>
  <td>Returns the root directory that holds all third-party extensions.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getFormat">
  <td><a href="CApplication.html#getFormat-detail">getFormat()</a></td>
  <td>Returns the formatter component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getGlobalState">
  <td><a href="CApplication.html#getGlobalState-detail">getGlobalState()</a></td>
  <td>Returns a global value.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getHomeUrl">
  <td><a href="CApplication.html#getHomeUrl-detail">getHomeUrl()</a></td>
  <td>Returns the homepage URL</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getId">
  <td><a href="CApplication.html#getId-detail">getId()</a></td>
  <td>Returns the unique identifier for the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getLanguage">
  <td><a href="CApplication.html#getLanguage-detail">getLanguage()</a></td>
  <td>Returns the language that the user is using and the application should be targeted to.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getLocale">
  <td><a href="CApplication.html#getLocale-detail">getLocale()</a></td>
  <td>Returns the locale instance.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getLocaleDataPath">
  <td><a href="CApplication.html#getLocaleDataPath-detail">getLocaleDataPath()</a></td>
  <td>Returns the directory that contains the locale data.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getMessages">
  <td><a href="CApplication.html#getMessages-detail">getMessages()</a></td>
  <td>Returns the application message translations component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getModule">
  <td><a href="CModule.html#getModule-detail">getModule()</a></td>
  <td>Retrieves the named application module.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="getModulePath">
  <td><a href="CModule.html#getModulePath-detail">getModulePath()</a></td>
  <td>Returns the directory that contains the application modules.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="getModules">
  <td><a href="CModule.html#getModules-detail">getModules()</a></td>
  <td>Returns the configuration of the currently installed modules.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="getNumberFormatter">
  <td><a href="CApplication.html#getNumberFormatter-detail">getNumberFormatter()</a></td>
  <td>Returns the locale-dependent number formatter.
The current <a href="CConsoleApplication.html#getLocale">application locale</a> will be used.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getParams">
  <td><a href="CModule.html#getParams-detail">getParams()</a></td>
  <td>Returns user-defined parameters.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="getParentModule">
  <td><a href="CModule.html#getParentModule-detail">getParentModule()</a></td>
  <td>Returns the parent module.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="getRequest">
  <td><a href="CApplication.html#getRequest-detail">getRequest()</a></td>
  <td>Returns the request component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getRuntimePath">
  <td><a href="CApplication.html#getRuntimePath-detail">getRuntimePath()</a></td>
  <td>Returns the directory that stores runtime files.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getSecurityManager">
  <td><a href="CApplication.html#getSecurityManager-detail">getSecurityManager()</a></td>
  <td>Returns the security manager component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getStatePersister">
  <td><a href="CApplication.html#getStatePersister-detail">getStatePersister()</a></td>
  <td>Returns the state persister component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getTimeZone">
  <td><a href="CApplication.html#getTimeZone-detail">getTimeZone()</a></td>
  <td>Returns the time zone used by this application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="getUrlManager">
  <td><a href="CApplication.html#getUrlManager-detail">getUrlManager()</a></td>
  <td>Returns the URL manager component.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="handleError">
  <td><a href="CApplication.html#handleError-detail">handleError()</a></td>
  <td>Handles PHP execution errors such as warnings, notices.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="handleException">
  <td><a href="CApplication.html#handleException-detail">handleException()</a></td>
  <td>Handles uncaught PHP exceptions.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="hasComponent">
  <td><a href="CModule.html#hasComponent-detail">hasComponent()</a></td>
  <td>Checks whether the named component exists.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="hasEvent">
  <td><a href="CComponent.html#hasEvent-detail">hasEvent()</a></td>
  <td>Determines whether an event is defined.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="hasEventHandler">
  <td><a href="CComponent.html#hasEventHandler-detail">hasEventHandler()</a></td>
  <td>Checks whether the named event has attached handlers.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="hasModule">
  <td><a href="CModule.html#hasModule-detail">hasModule()</a></td>
  <td>Returns a value indicating whether the specified module is installed.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="hasProperty">
  <td><a href="CComponent.html#hasProperty-detail">hasProperty()</a></td>
  <td>Determines whether a property is defined.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="loadGlobalState">
  <td><a href="CApplication.html#loadGlobalState-detail">loadGlobalState()</a></td>
  <td>Loads the global state data from persistent storage.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="onBeginRequest">
  <td><a href="CApplication.html#onBeginRequest-detail">onBeginRequest()</a></td>
  <td>Raised right BEFORE the application processes the request.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="onEndRequest">
  <td><a href="CApplication.html#onEndRequest-detail">onEndRequest()</a></td>
  <td>Raised right AFTER the application processes the request.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="onError">
  <td><a href="CApplication.html#onError-detail">onError()</a></td>
  <td>Raised when a PHP execution error occurs.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="onException">
  <td><a href="CApplication.html#onException-detail">onException()</a></td>
  <td>Raised when an uncaught PHP exception occurs.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr id="processRequest">
  <td><a href="CConsoleApplication.html#processRequest-detail">processRequest()</a></td>
  <td>Processes the user request.</td>
  <td>CConsoleApplication</td>
</tr>
<tr class="inherited" id="raiseEvent">
  <td><a href="CComponent.html#raiseEvent-detail">raiseEvent()</a></td>
  <td>Raises an event.</td>
  <td><a href="CComponent.html">CComponent</a></td>
</tr>
<tr class="inherited" id="run">
  <td><a href="CApplication.html#run-detail">run()</a></td>
  <td>Runs the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="saveGlobalState">
  <td><a href="CApplication.html#saveGlobalState-detail">saveGlobalState()</a></td>
  <td>Saves the global state data into persistent storage.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="setAliases">
  <td><a href="CModule.html#setAliases-detail">setAliases()</a></td>
  <td>Defines the root aliases.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="setBasePath">
  <td><a href="CApplication.html#setBasePath-detail">setBasePath()</a></td>
  <td>Sets the root directory of the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr id="setCommand">
  <td><a href="CConsoleApplication.html#setCommand-detail">setCommand()</a></td>
  <td>This is shortcut method for <a href="CConsoleCommandRunner.html#setCommand">CConsoleCommandRunner::setCommand()</a>.</td>
  <td>CConsoleApplication</td>
</tr>
<tr id="setCommandPath">
  <td><a href="CConsoleApplication.html#setCommandPath-detail">setCommandPath()</a></td>
  <td>Sets the directory that contains the command classes.</td>
  <td>CConsoleApplication</td>
</tr>
<tr class="inherited" id="setComponent">
  <td><a href="CModule.html#setComponent-detail">setComponent()</a></td>
  <td>Puts a component under the management of the module.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="setComponents">
  <td><a href="CModule.html#setComponents-detail">setComponents()</a></td>
  <td>Sets the application components.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="setExtensionPath">
  <td><a href="CApplication.html#setExtensionPath-detail">setExtensionPath()</a></td>
  <td>Sets the root directory that holds all third-party extensions.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="setGlobalState">
  <td><a href="CApplication.html#setGlobalState-detail">setGlobalState()</a></td>
  <td>Sets a global value.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="setHomeUrl">
  <td><a href="CApplication.html#setHomeUrl-detail">setHomeUrl()</a></td>
  <td>Sets the homepage URL</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="setId">
  <td><a href="CApplication.html#setId-detail">setId()</a></td>
  <td>Sets the unique identifier for the application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="setImport">
  <td><a href="CModule.html#setImport-detail">setImport()</a></td>
  <td>Sets the aliases that are used in the module.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="setLanguage">
  <td><a href="CApplication.html#setLanguage-detail">setLanguage()</a></td>
  <td>Specifies which language the application is targeted to.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="setLocaleDataPath">
  <td><a href="CApplication.html#setLocaleDataPath-detail">setLocaleDataPath()</a></td>
  <td>Sets the directory that contains the locale data.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="setModulePath">
  <td><a href="CModule.html#setModulePath-detail">setModulePath()</a></td>
  <td>Sets the directory that contains the application modules.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="setModules">
  <td><a href="CModule.html#setModules-detail">setModules()</a></td>
  <td>Configures the sub-modules of this module.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="setParams">
  <td><a href="CModule.html#setParams-detail">setParams()</a></td>
  <td>Sets user-defined parameters.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="setRuntimePath">
  <td><a href="CApplication.html#setRuntimePath-detail">setRuntimePath()</a></td>
  <td>Sets the directory that stores runtime files.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="setTimeZone">
  <td><a href="CApplication.html#setTimeZone-detail">setTimeZone()</a></td>
  <td>Sets the time zone used by this application.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
</table>
</div>
<div class="summary docMethod">
<h2>Protected Methods</h2>

<p><a href="#" class="toggle">Hide inherited methods</a></p>

<table class="summaryTable">
<colgroup>
	<col class="col-method" />
	<col class="col-description" />
	<col class="col-defined" />
</colgroup>
<tr>
  <th>Method</th><th>Description</th><th>Defined By</th>
</tr>
<tr id="createCommandRunner">
  <td><a href="CConsoleApplication.html#createCommandRunner-detail">createCommandRunner()</a></td>
  <td>Creates the command runner instance.</td>
  <td>CConsoleApplication</td>
</tr>
<tr id="init">
  <td><a href="CConsoleApplication.html#init-detail">init()</a></td>
  <td>Initializes the application by creating the command runner.</td>
  <td>CConsoleApplication</td>
</tr>
<tr class="inherited" id="initSystemHandlers">
  <td><a href="CApplication.html#initSystemHandlers-detail">initSystemHandlers()</a></td>
  <td>Initializes the error handlers.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="preinit">
  <td><a href="CModule.html#preinit-detail">preinit()</a></td>
  <td>Preinitializes the module.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="preloadComponents">
  <td><a href="CModule.html#preloadComponents-detail">preloadComponents()</a></td>
  <td>Loads static application components.</td>
  <td><a href="CModule.html">CModule</a></td>
</tr>
<tr class="inherited" id="registerCoreComponents">
  <td><a href="CApplication.html#registerCoreComponents-detail">registerCoreComponents()</a></td>
  <td>Registers the core application components.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
</table>
</div>
<a name="events"></a>

<div class="summary docEvent">
<h2>Events</h2>

<p><a href="#" class="toggle">Hide inherited events</a></p>

<table class="summaryTable">
<colgroup>
	<col class="col-event" />
	<col class="col-description" />
	<col class="col-defined" />
</colgroup>
<tr>
  <th>Event</th><th>Description</th><th>Defined By</th>
</tr>
<tr class="inherited" id="onBeginRequest">
  <td><a href="CApplication.html#onBeginRequest-detail">onBeginRequest</a></td>
  <td>Raised right BEFORE the application processes the request.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="onEndRequest">
  <td><a href="CApplication.html#onEndRequest-detail">onEndRequest</a></td>
  <td>Raised right AFTER the application processes the request.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="onException">
  <td><a href="CApplication.html#onException-detail">onException</a></td>
  <td>Raised when an uncaught PHP exception occurs.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
<tr class="inherited" id="onError">
  <td><a href="CApplication.html#onError-detail">onError</a></td>
  <td>Raised when a PHP execution error occurs.</td>
  <td><a href="CApplication.html">CApplication</a></td>
</tr>
</table>
</div>
<h2>Property Details</h2>
<div class="detailHeader" id="command-detail">
command<span class="detailHeaderTag">
property
 (available since v1.1.14)
</span>
</div>

<div class="signature">
public CConsoleCommand|null <a href="CConsoleApplication.html#getCommand"><b>getCommand</b></a>()<br/>public void <a href="CConsoleApplication.html#setCommand"><b>setCommand</b></a>(<a href="CConsoleCommand.html">CConsoleCommand</a> $value)</div>

<p>Returns the currently running command.
This is shortcut method for <a href="CConsoleCommandRunner.html#getCommand">CConsoleCommandRunner::getCommand()</a>.</p>


<div class="detailHeader" id="commandMap-detail">
commandMap<span class="detailHeaderTag">
property
</span>
</div>

<div class="signature">
public array <b>$commandMap</b>;</div>

<p>mapping from command name to command configurations.
Each command configuration can be either a string or an array.
If the former, the string should be the file path of the command class.
If the latter, the array must contain a 'class' element which specifies
the command's class name or <a href="YiiBase.html#getPathOfAlias">class path alias</a>.
The rest name-value pairs in the array are used to initialize
the corresponding command properties. For example,
<pre>
array(
  'email'=&gt;array(
     'class'=&gt;'path.to.Mailer',
     'interval'=&gt;3600,
  ),
  'log'=&gt;'path/to/LoggerCommand.php',
)
</pre></p>


<div class="detailHeader" id="commandPath-detail">
commandPath<span class="detailHeaderTag">
property
</span>
</div>

<div class="signature">
public string <a href="CConsoleApplication.html#getCommandPath"><b>getCommandPath</b></a>()<br/>public void <a href="CConsoleApplication.html#setCommandPath"><b>setCommandPath</b></a>(string $value)</div>

<p>the directory that contains the command classes. Defaults to 'protected/commands'.</p>


<div class="detailHeader" id="commandRunner-detail">
commandRunner<span class="detailHeaderTag">
property
 <em>read-only</em> </span>
</div>

<div class="signature">
public <a href="CConsoleCommandRunner.html">CConsoleCommandRunner</a> <a href="CConsoleApplication.html#getCommandRunner"><b>getCommandRunner</b></a>()</div>

<p>Returns the command runner.</p>


<h2>Method Details</h2>

<div class="detailHeader" id="createCommandRunner-detail">
createCommandRunner()
<span class="detailHeaderTag">
method
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
protected <a href="CConsoleCommandRunner.html">CConsoleCommandRunner</a> <b>createCommandRunner</b>()</div>
</td></tr>
<tr>
  <td class="paramNameCol">{return}</td>
  <td class="paramTypeCol"><a href="CConsoleCommandRunner.html">CConsoleCommandRunner</a></td>
  <td class="paramDescCol">the command runner</td>
</tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L101">framework/console/CConsoleApplication.php#101</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">protected&nbsp;function&nbsp;</span><span style="color: #0000BB">createCommandRunner</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;new&nbsp;</span><span style="color: #0000BB">CConsoleCommandRunner</span><span style="color: #007700">;<br />}</span>
</span>
</code></div>
</div>
<p>Creates the command runner instance.</p>


<div class="detailHeader" id="displayError-detail">
displayError()
<span class="detailHeaderTag">
method
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
public void <b>displayError</b>(integer $code, string $message, string $file, string $line)</div>
</td></tr>
<tr>
  <td class="paramNameCol">$code</td>
  <td class="paramTypeCol">integer</td>
  <td class="paramDescCol">error code</td>
</tr>
<tr>
  <td class="paramNameCol">$message</td>
  <td class="paramTypeCol">string</td>
  <td class="paramDescCol">error message</td>
</tr>
<tr>
  <td class="paramNameCol">$file</td>
  <td class="paramTypeCol">string</td>
  <td class="paramDescCol">error file</td>
</tr>
<tr>
  <td class="paramNameCol">$line</td>
  <td class="paramTypeCol">string</td>
  <td class="paramDescCol">error line</td>
</tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L115">framework/console/CConsoleApplication.php#115</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">displayError</span><span style="color: #007700">(</span><span style="color: #0000BB">$code</span><span style="color: #007700">,</span><span style="color: #0000BB">$message</span><span style="color: #007700">,</span><span style="color: #0000BB">$file</span><span style="color: #007700">,</span><span style="color: #0000BB">$line</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"PHP&nbsp;Error[</span><span style="color: #0000BB">$code</span><span style="color: #DD0000">]:&nbsp;</span><span style="color: #0000BB">$message</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;file&nbsp;</span><span style="color: #0000BB">$file</span><span style="color: #DD0000">&nbsp;at&nbsp;line&nbsp;</span><span style="color: #0000BB">$line</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$trace</span><span style="color: #007700">=</span><span style="color: #0000BB">debug_backtrace</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;skip&nbsp;the&nbsp;first&nbsp;4&nbsp;stacks&nbsp;as&nbsp;they&nbsp;do&nbsp;not&nbsp;tell&nbsp;the&nbsp;error&nbsp;position<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">count</span><span style="color: #007700">(</span><span style="color: #0000BB">$trace</span><span style="color: #007700">)&gt;</span><span style="color: #0000BB">4</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$trace</span><span style="color: #007700">=</span><span style="color: #0000BB">array_slice</span><span style="color: #007700">(</span><span style="color: #0000BB">$trace</span><span style="color: #007700">,</span><span style="color: #0000BB">4</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;foreach(</span><span style="color: #0000BB">$trace&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$i</span><span style="color: #007700">=&gt;</span><span style="color: #0000BB">$t</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!isset(</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">]))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">]=</span><span style="color: #DD0000">'unknown'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!isset(</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'line'</span><span style="color: #007700">]))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'line'</span><span style="color: #007700">]=</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!isset(</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'function'</span><span style="color: #007700">]))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'function'</span><span style="color: #007700">]=</span><span style="color: #DD0000">'unknown'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"#</span><span style="color: #0000BB">$i</span><span style="color: #DD0000">&nbsp;</span><span style="color: #007700">{</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">]}</span><span style="color: #DD0000">(</span><span style="color: #007700">{</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'line'</span><span style="color: #007700">]}</span><span style="color: #DD0000">):&nbsp;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(isset(</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'object'</span><span style="color: #007700">])&nbsp;&amp;&amp;&nbsp;</span><span style="color: #0000BB">is_object</span><span style="color: #007700">(</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'object'</span><span style="color: #007700">]))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">get_class</span><span style="color: #007700">(</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'object'</span><span style="color: #007700">]).</span><span style="color: #DD0000">'-&gt;'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #007700">{</span><span style="color: #0000BB">$t</span><span style="color: #007700">[</span><span style="color: #DD0000">'function'</span><span style="color: #007700">]}</span><span style="color: #DD0000">()\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}</span>
</span>
</code></div>
</div>
<p>Displays the captured PHP error.
This method displays the error in console mode when there is
no active error handler.</p>


<div class="detailHeader" id="displayException-detail">
displayException()
<span class="detailHeaderTag">
method
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
public void <b>displayException</b>(Exception $exception)</div>
</td></tr>
<tr>
  <td class="paramNameCol">$exception</td>
  <td class="paramTypeCol">Exception</td>
  <td class="paramDescCol">the uncaught exception</td>
</tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L144">framework/console/CConsoleApplication.php#144</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">displayException</span><span style="color: #007700">(</span><span style="color: #0000BB">$exception</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$exception</span><span style="color: #007700">;<br />}</span>
</span>
</code></div>
</div>
<p>Displays the uncaught PHP exception.
This method displays the exception in console mode when there is
no active error handler.</p>


<div class="detailHeader" id="getCommand-detail">
getCommand()
<span class="detailHeaderTag">
method
(available since v1.1.14)
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
public CConsoleCommand|null <b>getCommand</b>()</div>
</td></tr>
<tr>
  <td class="paramNameCol">{return}</td>
  <td class="paramTypeCol">CConsoleCommand|null</td>
  <td class="paramDescCol">the currently active command.</td>
</tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L186">framework/console/CConsoleApplication.php#186</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">getCommand</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getCommandRunner</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">getCommand</span><span style="color: #007700">();<br />}</span>
</span>
</code></div>
</div>
<p>Returns the currently running command.
This is shortcut method for <a href="CConsoleCommandRunner.html#getCommand">CConsoleCommandRunner::getCommand()</a>.</p>


<div class="detailHeader" id="getCommandPath-detail">
getCommandPath()
<span class="detailHeaderTag">
method
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
public string <b>getCommandPath</b>()</div>
</td></tr>
<tr>
  <td class="paramNameCol">{return}</td>
  <td class="paramTypeCol">string</td>
  <td class="paramDescCol">the directory that contains the command classes. Defaults to 'protected/commands'.</td>
</tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L152">framework/console/CConsoleApplication.php#152</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">getCommandPath</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$applicationCommandPath&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getBasePath</span><span style="color: #007700">().</span><span style="color: #0000BB">DIRECTORY_SEPARATOR</span><span style="color: #007700">.</span><span style="color: #DD0000">'commands'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_commandPath</span><span style="color: #007700">===</span><span style="color: #0000BB">null&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">$applicationCommandPath</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setCommandPath</span><span style="color: #007700">(</span><span style="color: #0000BB">$applicationCommandPath</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_commandPath</span><span style="color: #007700">;<br />}</span>
</span>
</code></div>
</div>
<p></p>


<div class="detailHeader" id="getCommandRunner-detail">
getCommandRunner()
<span class="detailHeaderTag">
method
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
public <a href="CConsoleCommandRunner.html">CConsoleCommandRunner</a> <b>getCommandRunner</b>()</div>
</td></tr>
<tr>
  <td class="paramNameCol">{return}</td>
  <td class="paramTypeCol"><a href="CConsoleCommandRunner.html">CConsoleCommandRunner</a></td>
  <td class="paramDescCol">the command runner.</td>
</tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L175">framework/console/CConsoleApplication.php#175</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">getCommandRunner</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_runner</span><span style="color: #007700">;<br />}</span>
</span>
</code></div>
</div>
<p>Returns the command runner.</p>


<div class="detailHeader" id="init-detail">
init()
<span class="detailHeaderTag">
method
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
protected void <b>init</b>()</div>
</td></tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L75">framework/console/CConsoleApplication.php#75</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">protected&nbsp;function&nbsp;</span><span style="color: #0000BB">init</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">parent</span><span style="color: #007700">::</span><span style="color: #0000BB">init</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;if(empty(</span><span style="color: #0000BB">$_SERVER</span><span style="color: #007700">[</span><span style="color: #DD0000">'argv'</span><span style="color: #007700">]))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;die(</span><span style="color: #DD0000">'This&nbsp;script&nbsp;must&nbsp;be&nbsp;run&nbsp;from&nbsp;the&nbsp;command&nbsp;line.'</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_runner</span><span style="color: #007700">=</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">createCommandRunner</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_runner</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">commands</span><span style="color: #007700">=</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">commandMap</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_runner</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addCommands</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getCommandPath</span><span style="color: #007700">());<br />}</span>
</span>
</code></div>
</div>
<p>Initializes the application by creating the command runner.</p>


<div class="detailHeader" id="processRequest-detail">
processRequest()
<span class="detailHeaderTag">
method
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
public void <b>processRequest</b>()</div>
</td></tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L90">framework/console/CConsoleApplication.php#90</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">processRequest</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$exitCode</span><span style="color: #007700">=</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_runner</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">run</span><span style="color: #007700">(</span><span style="color: #0000BB">$_SERVER</span><span style="color: #007700">[</span><span style="color: #DD0000">'argv'</span><span style="color: #007700">]);<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">is_int</span><span style="color: #007700">(</span><span style="color: #0000BB">$exitCode</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">end</span><span style="color: #007700">(</span><span style="color: #0000BB">$exitCode</span><span style="color: #007700">);<br />}</span>
</span>
</code></div>
</div>
<p>Processes the user request.
This method uses a console command runner to handle the particular user command.
Since version 1.1.11 this method will exit application with an exit code if one is returned by the user command.</p>


<div class="detailHeader" id="setCommand-detail">
setCommand()
<span class="detailHeaderTag">
method
(available since v1.1.14)
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
public void <b>setCommand</b>(<a href="CConsoleCommand.html">CConsoleCommand</a> $value)</div>
</td></tr>
<tr>
  <td class="paramNameCol">$value</td>
  <td class="paramTypeCol"><a href="CConsoleCommand.html">CConsoleCommand</a></td>
  <td class="paramDescCol">the currently active command.</td>
</tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L196">framework/console/CConsoleApplication.php#196</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">setCommand</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getCommandRunner</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">setCommand</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">);<br />}</span>
</span>
</code></div>
</div>
<p>This is shortcut method for <a href="CConsoleCommandRunner.html#setCommand">CConsoleCommandRunner::setCommand()</a>.</p>


<div class="detailHeader" id="setCommandPath-detail">
setCommandPath()
<span class="detailHeaderTag">
method
</span>
</div>

<table class="summaryTable">
<tr><td colspan="3">
<div class="signature2">
public void <b>setCommandPath</b>(string $value)</div>
</td></tr>
<tr>
  <td class="paramNameCol">$value</td>
  <td class="paramTypeCol">string</td>
  <td class="paramDescCol">the directory that contains the command classes.</td>
</tr>
</table>

<div class="sourceCode">
<b>Source Code:</b> <a class="sourceLink" href="https://github.com/yiisoft/yii/blob/1.1.17/framework/console/CConsoleApplication.php#L164">framework/console/CConsoleApplication.php#164</a> (<b><a href="#" class="show">show</a></b>)
<div class="code"><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">setCommandPath</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;if((</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_commandPath</span><span style="color: #007700">=</span><span style="color: #0000BB">realpath</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">))===</span><span style="color: #0000BB">false&nbsp;</span><span style="color: #007700">||&nbsp;!</span><span style="color: #0000BB">is_dir</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_commandPath</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;new&nbsp;</span><span style="color: #0000BB">CException</span><span style="color: #007700">(</span><span style="color: #0000BB">Yii</span><span style="color: #007700">::</span><span style="color: #0000BB">t</span><span style="color: #007700">(</span><span style="color: #DD0000">'yii'</span><span style="color: #007700">,</span><span style="color: #DD0000">'The&nbsp;command&nbsp;path&nbsp;"{path}"&nbsp;is&nbsp;not&nbsp;a&nbsp;valid&nbsp;directory.'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array(</span><span style="color: #DD0000">'{path}'</span><span style="color: #007700">=&gt;</span><span style="color: #0000BB">$value</span><span style="color: #007700">)));<br />}</span>
</span>
</code></div>
</div>
<p></p>


</div><!-- end of content -->

<div id="apiFooter">
&copy; 2008-2013 by <a href="http://www.yiisoft.com">Yii Software LLC</a><br/>
All Rights Reserved.<br/>
</div><!-- end of footer -->

<script type="text/javascript">
/*<![CDATA[*/
$("a.toggle").toggle(function(){
	$(this).text($(this).text().replace(/Hide/,'Show'));
	$(this).parents(".summary").find(".inherited").hide();
},function(){
	$(this).text($(this).text().replace(/Show/,'Hide'));
	$(this).parents(".summary").find(".inherited").show();
});
$(".sourceCode a.show").toggle(function(){
	$(this).text($(this).text().replace(/show/,'hide'));
	$(this).parents(".sourceCode").find("div.code").show();
},function(){
	$(this).text($(this).text().replace(/hide/,'show'));
	$(this).parents(".sourceCode").find("div.code").hide();
});
$("a.sourceLink").click(function(){
	$(this).attr('target','_blank');
});
/*]]>*/
</script>

</div><!-- end of page -->
</body>
</html>